<?php
    require_once("../../shop/DBUtil.php");
    $pid = $_REQUEST["pid"];
    $sql = "select p_id,p_name,p_info,p_price,p_unit,p_image_url from t_product where p_id = $pid";
    $products = query(getConn(), $sql);
    $product = $products[0];
    
    header("Content-Type:text/html;charset=utf-8");
    // 输出json
    // echo json_encode($product);

    echo "<div id='name'>". $product["p_name"] ."</div>";
    echo "<div id='price'>". $product["p_price"] ."</div>";
?>